n=eval(input())
s2=""
maxa_len=0
for i in range(0,n):
    s=input()
    if len(s)>maxa_len:
        s2=s
        maxa_len=len(s)
print("The longest is:",s2)